package day2.HomeWork;

/**
 * ClassName：MyThread
 *
 * @Author：小鱼
 * @Create：2025-08-19 16:53
 */
public class MyThread extends Thread{
    @Override
    public void run(){
        for (int i = 0; i < 10; i++) {
            System.out.println(Thread.currentThread().getName()+":"+i);
            try {
                // 每次输出后休眠1秒
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
